<template>
  <div class="empty-wrap" :style="{height:height}">
    <slot>
      <img
        src="@/assets/images/chart-empty.png"
        mode="aspectFit"
        class="empty-img"
      >
    </slot>

    <div class="tip-text">{{ tips }}</div>
  </div>
</template>

<script>
export default {
  name: 'DataIsEmpty',

  props: {
    tips: {
      type: String,
      default: '当前暂无数据~'
    },
    height: {
      type: String,
      default: '300px'
    },
  }
}
</script>

<style lang="scss" scoped>
.empty-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  background: #fff;

  .empty-img {
    display: block;
    width: 500px;
  }

  .tip-text{
    font-size: 18px;
    margin-top: 30px;
    color: #999;
  }

}
</style>
